import java.io.File;
import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
//        File file = new File("test.txt");
//
//        File file2 = new File(file,"test2.txt");

//        File file3 = new File("d:/","test.txt");
//        String test = file3.getParent();
//        System.out.println(test);
//        File file = new File("d:/","test.txt");
//        String name = file.getName();
//        System.out.println(name);
//        File file = new File("d:/","test.txt");
//        String test1 = file.getPath();
//        String test2 = file.getAbsolutePath();
//        System.out.println(test1);
//        System.out.println(test2);
//        File file = new File("d:/../test.txt");
//        String test = file.getCanonicalPath();
//        System.out.println(test);
//        File file = new File("d:/test");
//        Boolean flg = file.exists();
//        System.out.println(flg);
//        File file = new File("d:/test");
//        Boolean flg = file.isDirectory();
//        Boolean flg2 = file.isFile();
//        System.out.println(flg);
//        System.out.println(flg2);
//        File file = new File("d:/test.txt");
//        Boolean flg = file.createNewFile();
//        System.out.println(flg);
//          File file = new File("d:/test.txt");
//          Boolean flg = file.delete();
//          System.out.println(flg);
//        File file = new File("d:/test");
//        file.deleteOnExit();
//        File file = new File("d:Demo");
//        for (String fileName:file.list()) {
//            System.out.println(fileName);
//        }
//        File file = new File("d:/Demo");
//        for (File fileN:file.listFiles()) {
//            System.out.println(fileN.getName());
//        }
//        File file = new File("d:Demo");
//        File file1 = new File("d:test");
//        file.renameTo(file1);
//        File file = new File("d:/test");
//        Boolean flg = file.canRead();
//        Boolean flg2 = file.canWrite();
//        System.out.println(flg);
//        System.out.println(flg2);
    }
}
